package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.WlConfigPatsetting;
import com.ysd.lis.request.wl.WlConfigSettingParam;
import com.ysd.lis.service.lab.WlConfigPatsettingService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 病人信息配置 前端控制器
 * </p>
 *
 * @author WangHao
 * @since 2024-01-18
 */
@RestController
@RequestMapping("/lab/wlConfigPatsetting")
public class WlConfigPatsettingController extends BaseController {
    @Autowired
    private WlConfigPatsettingService wlConfigPatsettingService;

    @ApiOperation("通过配置id获取病人信息")
    @GetMapping("/findPatsettingByConfigId")
    public Result findPatsettingByConfigId(WlConfigSettingParam wlConfigParam) {
        return wlConfigPatsettingService.findPatsettingByConfigId(wlConfigParam);
    }

    @ApiOperation("模板快速插入")
    @PostMapping("/insertPatsettingByTemp")
    public Result insertPatsettingByTemp(@RequestBody List<WlConfigPatsetting> configPatsetting) {
        return wlConfigPatsettingService.insertPatsettingByTemp(configPatsetting);
    }

    @ApiOperation("新增或修改病人信息")
    @PostMapping("/insertOrUpdatePatsetting")
    public Result insertOrUpdatePatsetting(@RequestBody List<WlConfigPatsetting> configPatsetting) {
        return wlConfigPatsettingService.insertOrUpdatePatsetting(configPatsetting);
    }

}
